home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 4: GNU Archives / Linux Cubed Series 4 - GNU Archives.iso / gnu / graphics.17 / graphics / graphics-0.17 / tek2plot / cont.c < prev    next >
Encoding:
C/C++ Source or Header  |  1991-03-12  |  2.2 KB  |  63 lines

  1. /* Copyright (C) 1989 Free Software Foundation, Inc.
  2.  
  3.    plot is distributed in the hope that it will be useful, but WITHOUT
  4.    ANY WARRANTY.  No author or distributor accepts responsibility to
  5.    anyone for the consequences of using it or for whether it serves any
  6.    particular purpose or works at all, unless he says so in writing.
  7.    Refer to the GNU General Public License for full details.
  8.  
  9.    Everyone is granted permission to copy, modify and redistribute
  10.    plot, but only under the conditions described in the GNU General
  11.    Public License.  A copy of this license is supposed to have been
  12.    given to you along with libtek so you can know your rights and
  13.    responsibilities.  It should be in a file named COPYING.  Among
  14.    other things, the copyright notice and this notice must be preserved
  15.    on all copies.  */
  16.  
  17. /* This file is the cont routine, which is a standard part of the plot
  18.    library. It continues a line from the last point drawn to the point
  19.    specified by x and y.
  20.    */
  21. #include "sys-defines.h"
  22. #include "libplot.h"
  23. extern void putshort ();
  24.  
  25. double x_input_min = 0.; /* minimum input x coordinate */
  26. double y_input_min = 0.; /* minimum input y coordinate */
  27. double x_output_min = 0.; /* minimum output x coordinate */
  28. double y_output_min = 0.; /* minimum output y coordinate */
  29. double x_output_max = 767.; /* maximum-minimum output x coordinate */
  30. double y_output_max = 767.; /* maximum-minimum output y coordinate */
  31. double scaleup = 1.; /* default input to output scaleing for both x and y */
  32.  
  33. int last_x=0, last_y = 0; /* location of the last coordinates used */
  34.  
  35. /* this bit vector represents the line style (eg. dashed) for
  36.    idraw.  We intitialize it to all ones which represents a solid
  37.    line. */
  38. long line_type_bit_vector = 65535;
  39.  
  40. /* this is a string that should conatain a postscript vector
  41.    argument for the postscript setdash command.  This is allocted
  42.    in the open(3) function. */
  43. char *line_type_setdash;
  44.  
  45. /* the current length of the above buffer */
  46. int line_type_setdash_length;
  47.  
  48. /* one greater than the length in number of bits in the dash pattern.  */
  49.  
  50. int line_type_setdash_bits=0;
  51.  
  52.  
  53.  
  54. int
  55. cont (x, y)
  56.      int x, y;
  57. {
  58.   putchar ('n');
  59.   putshort (x);
  60.   putshort (y);
  61.   return 0;
  62. }
  63.